(use-package emms
  :bind
  (:prefix-map qrthi/url-emms-prefix
	       :prefix "C-c u e"
	       ("p" . emms-play-url)
	       ("a" . emms-add-url)
	       ("i" . emms-insert-url))
  (:prefix-map qrthi/music-prefix
	       :prefix "C-c m"
	       ("l" . emms)
	       ("i" . ivy-emms)
	       ("w" . emms-streams)
	       ("a" . emms-add-directory-tree)
	       ("b" . emms-previous)
	       ("f" . emms-next)
	       ("p" . emms-pause)
	       ("s" . emms-stop))
  (:map dired-mode-map
	("C-c m d" . emms-add-dired))
  (:map emms-browser-mode-map
	("RET" . emms-browser-add-tracks-and-play)
	("TAB" . emms-browser-expand-one-level))
  ;; (:map emms-playlist-mode-map
  ;;	("RET" . emms-pause)
  ;;	("C-f" . emms-seek-forward)
  ;;	("C-b" . emms-seek-backward)
  ;;	("M-f" . qrthi/emms-seek-forward-far)
  ;;	("M-b" . qrthi/emms-seek-backward-far)
  ;;	)
  :custom
  ;; (emms-player-mpd-server-name "antelope")
  ;; (emms-player-mpd-server-port "6600")
  (emms-source-file-default-directory qrthi/directory-media)
  ;; (emms-player-list
  ;;  '(emms-player-mplayer)
  ;;  ;; '(emms-player-mpd)
  ;;  )
  ;; ;; (emms-player-mpd-music-directory "/media/audio")
  ;; (emms-player-mplayer-parameters '("-slave"
  ;;				    "-quiet"
  ;;				    "-really-quiet"
  ;;				    ;; "-cache 8192"
  ;;				    ))
  (emms-history-file nil)
  :init
  (defun qrthi/emms-seek-forward-far ()
    (interactive)
    (emms-seek 60))
  (defun qrthi/emms-seek-backward-far ()
    (interactive)
    (emms-seek -60))
  :config
  ;; (require 'emms-setup)
  (emms-all)
  (emms-default-players)
  ;; (add-to-list 'emms-info-functions 'emms-info-mpd)
  ;; :custom
  ;; (emms-cache-file (expand-file-name "cache" emms-directory))
  ;; (emms-score-file (expand-file-name "score" emms-directory))
  ;; (emms-streams-file (expand-file-name "streams" emms-directory))
  )
